export const login = (data) => {
	return uni.$u.http.post("/login", data)
}

export const register = (data) => {
	return uni.$u.http.post('/api/user/register', data)
}

export const logout = () => uni.$u.http.post('/logout')

// 查询用户详细信息
export const getUserInfo = (config = {}) => uni.$u.http.get('/api/user/userInfo', config)

// id查询用户详细信息 
export const getUserInfoById = (id, config) => uni.$u.http.get('/api/phone/info/' + id, config)

// 更新用户信息
export const updateUserInfo = (params, config = {}) => uni.$u.http.put('/api/user/editUser', params, config)

// 获取验证码
export const getPhoneCode = (phone) => uni.$u.http.get('/api/user/code?phone=' + phone)

// 更新手机号
export const updatePhone = (params, config = {}) => uni.$u.http.put('/api/user/editPhone', params, config)

// 获取反馈问题类型列表
export const getFeedbackList = (params, config = {}) => uni.$u.http.get('/api/phone/type/list')

// 反馈问题
export const feedback = (params, config = {}) => uni.$u.http.post('/api/phone/feedback', params, config)

// 获取消息列表
export const getMessgeList = (params, config = {}) => uni.$u.http.get('/api/phone/center/list?status=' + params)

// 更新消息
export const updateMessage = (params, config = {}) => uni.$u.http.put('/api/phone/center', params)

// 更新登录密码
export const updateLoginPass = (params, config = {}) => uni.$u.http.put('/api/user/password', params, config)

// 更新远程密码
export const updateRomotePass = (params, config = {}) => uni.$u.http.put('/api/recharge/status/updPassword', params, config)

// 手机号验证码修改密码
export const resetPassword = (data)=> uni.$u.http.put('/api/user/password',data)

// 获取验证码
export const getCode = (data = {}) => uni.$u.http.get('/api/user/code', { data })

// 查询用户所有智能钥匙
export const getUserKeys = () => uni.$u.http.get('/api/recharge/key/list')
